package com.ruoyi.web.controller.class_choose.service.impl;

import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.controller.class_choose.mapper.AChooseClassMapper;
import com.ruoyi.web.controller.class_choose.domain.AChooseClass;
import com.ruoyi.web.controller.class_choose.service.IAChooseClassService;

/**
 * class_chooseService业务层处理
 *
 * @author G
 * @date 2025-04-28
 */
@Service
public class AChooseClassServiceImpl implements IAChooseClassService
{
    @Autowired
    private AChooseClassMapper aChooseClassMapper;

    /**
     * 查询class_choose
     *
     * @param userId class_choose主键
     * @return class_choose
     */
    @Override
    public AChooseClass selectAChooseClassByUserId(Long userId)
    {
        return aChooseClassMapper.selectAChooseClassByUserId(userId);
    }

    /**
     * 查询class_choose列表
     *
     * @param aChooseClass class_choose
     * @return class_choose
     */
    @Override
    public List<AChooseClass> selectAChooseClassList(AChooseClass aChooseClass)
    {
        return aChooseClassMapper.selectAChooseClassList(aChooseClass);
    }

    /**
     * 新增class_choose
     *
     * @param aChooseClass class_choose
     * @return 结果
     */
    @Override
    public int insertAChooseClass(AChooseClass aChooseClass)
    {
        return aChooseClassMapper.insertAChooseClass(aChooseClass);
    }

    /**
     * 修改class_choose
     *
     * @param aChooseClass class_choose
     * @return 结果
     */
    @Override
    public int updateAChooseClass(AChooseClass aChooseClass)
    {
        return aChooseClassMapper.updateAChooseClass(aChooseClass);
    }

    /**
     * 批量删除class_choose
     *
     * @param userIds 需要删除的class_choose主键
     * @return 结果
     */
    @Override
    public int deleteAChooseClassByUserIds(Long[] userIds)
    {
        return aChooseClassMapper.deleteAChooseClassByUserIds(userIds);
    }

    /**
     * 删除class_choose信息
     *
     * @param userId class_choose主键
     * @return 结果
     */
    @Override
    public int deleteAChooseClassByUserId(Long userId)
    {
        return aChooseClassMapper.deleteAChooseClassByUserId(userId);
    }




//    -------------------------------------------------------------------------------------------------------------------------------
    /**
     * 个人课程
     *
     *
     * @return class_choose
     */
    @Override
    public List<HashMap<String, Object>> selectAChooseClassListS( ) {
        return aChooseClassMapper.selectAChooseClassListS();
    }

    @Override
    public int deleteFromClassId(Long id) {
        return aChooseClassMapper.deleteFromClassId(id);
    }

}
